import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase="DBshop035_积分调整"
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu2(firefox,"客户管理","管理客户")
firefox.find_element_by_xpath("//td[text()='kunkun']/following-sibling::td[7]/a[3]").click()
time.sleep(3)
firefox.find_element_by_id("change_user_integral_num").send_keys("10000")
firefox.find_element_by_id("change_integral_type_2_num").send_keys("10000")
firefox.find_element_by_id("integral_log_info").send_keys("买手机送积分")
firefox.find_element_by_xpath("//button[text()='提交调整']").click()

if firefox.find_element_by_xpath("//td[text()='kunkun']/following-sibling::td[6]").text=="10000 / 10000":
    writeLog("%s 测试通过" % testCase)

else:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
